package cn.wolfcode.crm.domain;

import com.alibaba.fastjson.JSON;
import lombok.Data;

import java.util.HashMap;

@Data
public class Department {
    private Long id;
    private String name;
    private String sn;

    public String getJson() {
        HashMap map = new HashMap();
        map.put("id", id);
        map.put("name", name);
        map.put("sn", sn);
        //将map形式转化为json字符串形式
        return JSON.toJSONString(map);
    }
}